a19d556feeec6bfde2f24412919f03de2a5e511a
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 1"""
4  date="2023-09-07T17:01:41Z"
5  content="""
6 I wonder if it even makes sense for git-annex-shell to replicate this git
7 security check, or would it be better for it to instruct git to trust the
8 repository, so it can be used on it?
9
10 git's CVE-2022-24765 involves a malicious creation of a .git repository
11 above the victim's cwd, with a .git/config that causes things like eg shell
12 prompts that run git to execute attacker-controlled commands.
13
14 git-annex-shell commands all take the directory that the repository is
15 in, and uses that repository. So it doesn't traverse above looking for
16 other .git directories.
17
18 And, `git clone` will happily clone a remote repsository that's owned 
19 by another user, including over ssh. And pull and push etc work with such a
20 remote. So git-annex-shell should too.
21
22 (For that matter, other git-annex-shell commands do work, it's only the
23 command that reads the git config that fails to work.)
24 """]]